﻿using System.Collections.Generic;
using System.Data;
using Components;
using UI.Lib.Factory;
using UI.Lib.Set;
using UI.ParentForm;

namespace UI.SellOrder
{
    public partial class FrmOrdReturnPrint : BasePrint
    {
        public FrmOrdReturnPrint()
        {
            InitializeComponent();

            this.Text = "退货单打印";
        }

        protected override void SetParam()
        {
            this.ReportType = UI.Lib.Context.GlobalBoolean("11") ? "" : "NP";
        }

        /// <summary>
        /// 设置报表名称
        /// </summary>
        /// <returns></returns>
        protected override Telerik.Reporting.Report SetReportName()
        {
            return new UI.Reports.OrdSendDocA4();
        }

        protected override DataTable SetReportSummaryData()
        {
            return CommonHelper.Entity.ExecFun("printreturndocsum", new KeyValuePair<string, object>("listid", base.GetParamByKey("listid")));
        }

        //返回明细数据
        protected override DataTable SetReportDetailData()
        {
            return CommonHelper.Entity.ExecFun("printreturndocdetail", new KeyValuePair<string, object>("listid", base.GetParamByKey("listid")));
        }
    }
}
